﻿// Decompiled with JetBrains decompiler
// Type: TaleWorlds.CampaignSystem.Conversation.Persuasion.PersuasionOptionArgs
// Assembly: TaleWorlds.CampaignSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E85F8C15-4DF6-4E9C-A58A-29177E40D07A
// Assembly location: D:\steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client\TaleWorlds.CampaignSystem.dll

using System;
using System.Collections.Generic;
using TaleWorlds.CampaignSystem.CharacterDevelopment;
using TaleWorlds.Core;
using TaleWorlds.Localization;
using TaleWorlds.SaveSystem;

#nullable disable
namespace TaleWorlds.CampaignSystem.Conversation.Persuasion
{
  public class PersuasionOptionArgs
  {
    [SaveableField(102)]
    public readonly PersuasionArgumentStrength ArgumentStrength;
    [SaveableField(103)]
    public readonly SkillObject SkillUsed;
    [SaveableField(104)]
    public readonly TraitObject TraitUsed;
    [SaveableField(111)]
    public readonly Tuple<TraitObject, int>[] TraitCorrelation;
    [SaveableField(105)]
    public readonly TraitEffect TraitEffect;
    [SaveableField(106)]
    public readonly bool CanBlockOtherOption;
    [SaveableField(107)]
    public readonly bool CanMoveToTheNextReservation;
    [SaveableField(108)]
    public readonly bool GivesCriticalSuccess;
    [SaveableField(110)]
    public readonly TextObject Line;
    [SaveableField(109)]
    private bool _isBlocked;

    internal static void AutoGeneratedStaticCollectObjectsPersuasionOptionArgs(
      object o,
      List<object> collectedObjects)
    {
      ((PersuasionOptionArgs) o).AutoGeneratedInstanceCollectObjects(collectedObjects);
    }

    protected virtual void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
    {
      collectedObjects.Add((object) this.SkillUsed);
      collectedObjects.Add((object) this.TraitUsed);
      collectedObjects.Add((object) this.TraitCorrelation);
      collectedObjects.Add((object) this.Line);
    }

    internal static object AutoGeneratedGetMemberValueArgumentStrength(object o)
    {
      return (object) ((PersuasionOptionArgs) o).ArgumentStrength;
    }

    internal static object AutoGeneratedGetMemberValueSkillUsed(object o)
    {
      return (object) ((PersuasionOptionArgs) o).SkillUsed;
    }

    internal static object AutoGeneratedGetMemberValueTraitUsed(object o)
    {
      return (object) ((PersuasionOptionArgs) o).TraitUsed;
    }

    internal static object AutoGeneratedGetMemberValueTraitCorrelation(object o)
    {
      return (object) ((PersuasionOptionArgs) o).TraitCorrelation;
    }

    internal static object AutoGeneratedGetMemberValueTraitEffect(object o)
    {
      return (object) ((PersuasionOptionArgs) o).TraitEffect;
    }

    internal static object AutoGeneratedGetMemberValueCanBlockOtherOption(object o)
    {
      return (object) ((PersuasionOptionArgs) o).CanBlockOtherOption;
    }

    internal static object AutoGeneratedGetMemberValueCanMoveToTheNextReservation(object o)
    {
      return (object) ((PersuasionOptionArgs) o).CanMoveToTheNextReservation;
    }

    internal static object AutoGeneratedGetMemberValueGivesCriticalSuccess(object o)
    {
      return (object) ((PersuasionOptionArgs) o).GivesCriticalSuccess;
    }

    internal static object AutoGeneratedGetMemberValueLine(object o)
    {
      return (object) ((PersuasionOptionArgs) o).Line;
    }

    internal static object AutoGeneratedGetMemberValue_isBlocked(object o)
    {
      return (object) ((PersuasionOptionArgs) o)._isBlocked;
    }

    public bool IsBlocked => this._isBlocked;

    public PersuasionOptionArgs(
      SkillObject skill,
      TraitObject trait,
      TraitEffect traitEffect,
      PersuasionArgumentStrength argumentStrength,
      bool givesCriticalSuccess,
      TextObject line,
      Tuple<TraitObject, int>[] traitCorrelation = null,
      bool canBlockOtherOption = false,
      bool canMoveToTheNextReservation = false,
      bool isInitiallyBlocked = false)
    {
      this.SkillUsed = skill;
      this.TraitUsed = trait;
      this.TraitEffect = traitEffect;
      this.ArgumentStrength = argumentStrength;
      this.GivesCriticalSuccess = givesCriticalSuccess;
      this.CanBlockOtherOption = canBlockOtherOption;
      this.CanMoveToTheNextReservation = canMoveToTheNextReservation;
      this._isBlocked = isInitiallyBlocked;
      this.Line = line;
      this.TraitCorrelation = traitCorrelation;
    }

    public void BlockTheOption(bool isBlocked) => this._isBlocked = isBlocked;
  }
}
